package com.example.demo.jpa.mapper;

import com.example.demo.model.Material;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.querydsl.QueryDslPredicateExecutor;

import java.util.List;

/**
 * Created by 86151 on 2018/12/25.
 */
public interface JPARepository extends JpaRepository<Material,Integer>,QueryDslPredicateExecutor<Material> {
    List<Material> findMaterialByMaterialCodeIn(List<String> codes);
    List<Material> findByMaterialCode(String code);
    List<Material> findByMaterialName(String name);
    List<Material> findByMaterialCodeAndMaterialName(String code,String name);
    Material findById(Integer id);
}
